package news.dao;


import news.model.SystemInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface SystemDao {

    @Select("select id,site_name,logo,company_name,phone,address,icp from system_info")
    SystemInfo systemList(SystemInfo systemInfo);

    @Update("update system_info set site_name=#{siteName},logo=#{logo},company_name=#{companyName}," +
            "phone=#{phone},address=#{address},icp=#{icp} where id=#{id}")
    void saveSystem(SystemInfo systemInfo);

}
